import instance from '@/utils/request'
export const getEmoloyeeList = (params) => {
  return instance.get('/sys/user', { params })
}
// 批量-导出员工excel
export const exportEmployee = () => {
  return instance.get('/sys/user/export', { responseType: 'blob' })
}
// 批量-下载导入员工模板
export const getTemplate = () => {
  return instance.get('/sys/user/import/template', { responseType: 'blob' })
}
// 批量-导入员工(上传excel)
export const uploadExcel = (data) => {
  return instance.post('/sys/user/import', data)
}
// 新增-员工
export const addEmployee = (data) => {
  return instance.post('/sys/user', data)
}
// 获取-员工-基本信息
export const getEmoloyeeDetail = (id) => {
  return instance.get(`/sys/user/${id}`)
}
// 修改-员工-基本信息
export const update = (data) => {
  return instance.put(`/sys/user/${data.id}`, data)
}
